<%@ page language="java" import="it.polimi.swim.entity.SystemUser,java.util.List"
contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Your Friends</title>
</head>
<body>
Friends' List

<%
//Esiste una sessione aperta
if(session.getAttribute("mail")!=null){
	
	//List<RegisteredUser> friendList=(List<RegisteredUser>)request.getAttribute("friendList");
	
	
	for(SystemUser user:(List<SystemUser>)request.getAttribute("friendList")){
		out.println("Name: "+user.getName()+"<br>");
		out.println("Surname: "+user.getSurname()+"<br>");
		out.println("City: "+user.getCity()+"<br><br>");
		
	}
}
else{
	out.println("<a href='index.jsp'>Log in</a>");
}
%>



</body>
</html>